import threading
class MulThread(threading.Thread):  
    def __init__(self, func, args=()):  
        super(MulThread, self).__init__()  
        self.func = func  
        self.args = args  
  
    def run(self):  
        self.result = self.func(*self.args)